package Package.Example.Example_3;

import javax.crypto.spec.PSource;

public class Example_3 {
   private static int x;
   private  static int y;
    public static final void Example_3(){
        x=3;
        y=5;
        int and=useAddable(new Addable() {
            @Override
            public int add(int x, int y) {
                return x+y;
            }
        });
        System.out.println(and);
        x=200;
        y=500;
        int b=useAddable((int x,int y)->{
            return x+y;
        });
        System.out.println(b);
    }
    private static int useAddable(Addable a){

        return a.add(x,y);
    }

}
